<!doctype html>
<head>
    <meta charset="UTF-8">
    <title>添加漫画信息</title>
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <link rel="stylesheet" href="../css/bootstrap-theme.min.css">

</head>
<body>
<div class="container">
    <div class="page-header">添加漫画信息</div>

    <form action="save.php" class="form-horizontal" method="post" enctype="multipart/form-data">
        <!--漫画作品名称-->
        <div class="form-group">
            <label for="cname" class="col-sm-2 control-label">漫画名称</label>
            <div class="col-sm-10">
                <input type="text" class="form-control"  name="cname" id="cname" placeholder="请输入漫画名称">
            </div>
        </div>

        <!--        漫画作品类型-->
        <div class="form-group">
            <label for="ctype" class="col-sm-2 control-label">漫画类型</label>
            <div class="col-sm-10">
                <select class="form-control" name="type_id" id="ctype">
                    <?php
                    include dirname(__FILE__) ."../../common/conn.php";
                    $sql="select * from type where state=0";
                    $res=mysqli_query($con,$sql);
                    mysqli_close($con);
                    while($row=mysqli_fetch_array($res)) {
                        ?>
                        <option value="<?php echo $row["id"] ?>"><?php echo $row["name"] ?></option>
                        <?php
                    }
                    ?>
                </select>
            </div>
        </div>

        <!--漫画封面-->
        <div class="form-group">
            <label  class="col-sm-2 control-label">漫画封面</label>
            <div class="col-sm-10">
                <input type="file" class="form-control" name="coverImg">
            </div>
        </div>

        <!--漫画作者-->
        <div class="form-group">
            <label for="cauthor" class="col-sm-2 control-label">漫画作者</label>
            <div class="col-sm-10">
                <input type="text" class="form-control"  name="cauthor" id="cauthor" placeholder="请输入漫画作者">
            </div>
        </div>

        <!--漫画简介-->
        <div class="form-group">
            <label for="cintroduction" class="col-sm-2 control-label">作品简介</label>
            <div class="col-sm-10">
                <textarea class="form-control" name="cintroduction" id="cintroduction" placeholder="请输入作品简介" rows="5"></textarea>
            </div>
        </div>




        <!--漫画状态-->
        <div class="form-group">
            <label for="cstate" class="col-sm-2 control-label">漫画状态</label>
            <div class="col-sm-10">
                <select class="form-control" name="cstate" id="cstate">
                    <option value ="连载">连载</option>
                    <option value ="完结">完结</option>
                </select>
            </div>
        </div>




        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary">添加</button>
                <a href="list.php" class="btn btn-danger">返回</a>
            </div>
        </div>
    </form>
</div>
</body>
</html>